import JSEncrypt from 'jsencrypt/bin/jsencrypt'

const _publicKey = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDQb9P46j6PUfZztfNRBf086UbW\n' +
    '0ZhGglI1X/ROUq7OiVsdNc4bpr5jgXPbLEPoZ2kzftRUXq9uq44+hqxyEnJAyvMA\n' +
    '1aDg7pCbKK8msAvKNBMeRwJ3wY48RWCuu3Ok40b5uoEnRYpu0Y5WwkSh/0kUvRFZ\n' +
    '7yU4hMzO2kUD+ZzxlQIDAQAB'
const _privateKey = 'MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIKbqswgxJf40CAggA\n' +
    'MBQGCCqGSIb3DQMHBAhD1cjMTb42ugSCAoCchR+SANIdHJH/oz6PbCa5xyW1t19O\n' +
    'wBn5ywAaN4u1O96Ze8gg+64XCgAwAUthDkUgibma8HUUoS6hAtKArqXS01fT40t5\n' +
    '3uWSDDN9U0QcYZXnGo++uT2GN+zwY52guvY0AADaPKY5YAyj1y1im4/oK7RRV5Xo\n' +
    'zd6J3nUTXxAci0Rd7/dzwa4OnXwyqm4/Hp4ezJmDRUIILy2CVwgvqJVuIdrHFxOu\n' +
    'vOYrWj4J7N7esS16K6x7FLmSb+ZyoaYw9HRa+vW/zPh5P4Ljx6IDIGugNgqe4XOO\n' +
    '/Vd5hYKWFcXXJIV6KV4TImAbF6znQRW5Te513xgamYHc1zreleM9ktfecJFcFiRA\n' +
    'lvgeB01THyDy0YMsFSkIf4X35xriyj1Rkl2ak3hgfSj6MCfKSYKl0K3Y8rEwASiS\n' +
    'CXatXYmSN2/TrSAR3FWMIYyWwmhrNJI1QUI30L+gDBo0cjCnshKigmd6vf9Jj5gg\n' +
    'z05yZ1j0dkgbJWZAG35zMhkD5PkDRUym+7NDkdr7FEIz+oorW+OURbPtReAM3Y29\n' +
    'plE8+GdWI8epfng1dwwyJyWAzGZ1p42mJGsAPw31sta7JHJg5pyIWeIYIpyxlmWm\n' +
    'ge+LFley+qJGONrMOJcOLl/IrsgekpUf/OqlIbmPDfwnVEmvkMed0WnogufAV/6F\n' +
    'RDSQMdlOjdHN2XOM2QmDWflJ+XLOmIQj/Dxo4dYfzKdahtIJer+OzI9pidjEyloV\n' +
    'j3jmkgxcxnmLOy9Qae7j5SHWxNUhbtemZBv8dYoCQEW3r/1Na685W3rQLptaJWUF\n' +
    '7Te/7n+QaDlXqeghzJB5MOYxSh/bJs+AvV6mKjoFm6hsaiiyztmnCZjC'

export function encrypt(text){
    const _a = new JSEncrypt()
    _a.setPublicKey(_publicKey)
    return _a.encrypt(text)
}

export function decrypt(text){
    const _a = new JSEncrypt()
    _a.setPrivateKey(_privateKey)
    return _a.decrypt(text)
}